import React from 'react';
import styles from './LeftDragSelect.less';
import FormSelectItem from './FormSelectItem';
import { defaultConfigArr } from '../ItemDefaultConfig';

class LeftDragSelect extends React.Component {
  render() {
    const { dropList = [], changeAddStatus, handleDelItem, className = '', style = {} } = this.props;
    return (
      <div className={`${styles.builder_item} ${className}`} style={style}>
        <div className={styles.title}>表单控件</div>
        {defaultConfigArr && defaultConfigArr.map(item => (
          <FormSelectItem
            key={item.id}
            // name={item.name}
            // type={item.type}
            item={item}
            dropList={dropList}
            changeAddStatus={changeAddStatus}
            handleDelItem={handleDelItem}
            className={styles.item_col}
          />
        )
        )}
      </div>
    );
  }
}

export default LeftDragSelect;